Important
Some features are currently unavailable.
π οΈ CLI Tool
The Command Line Interface (CLI) of the Fire Framework is a robust tool designed to streamline development workflows. It allows you to manage migrations, generate files, launch the development server, and moreβall through intuitive commands.
π Key Featuresβ
1. Start Development Serverβ
- Command:
php fire start - Description: Launches the development server on the default port
8000. - Example:
php fire start - Custom Port: Use the
--portoption to specify a custom port.php fire start --port=8080 - Docker Support: Start the server with Docker using the
--dockeroption.- Native Docker:
php fire start --docker=native - Docker Compose:
php fire start --docker=compose
- Native Docker:
2. Generate Controllersβ
Important
This feature is under development.
- Command:
php fire make:controller <name> - Description: Creates a new controller file in the designated directory.
- Example:
php fire make:controller UserController
3. Generate Modelsβ
Important
This feature is under development.
- Command:
php fire make:model <name> - Description: Generates a new model file for database interactions.
- Example:
php fire make:model User
4. Run Database Migrationsβ
- Command:
php fire migrate - Description: Executes all pending database migrations.
- Example:
php fire migrate - Rollback Migrations: Undo the last migration using the
--rollbackoption.php fire migrate --rollback
5. Create Migrationsβ
- Command:
php fire migrate::create <name> - Description: Creates a new migration file in the migrations directory.
- Example:
php fire migrate::create --name=UsersTable
6. List Available Commandsβ
- Command:
php fire list - Description: Displays a comprehensive list of all available CLI commands, including their descriptions, arguments, and options.
- Example:
php fire list
π Detailed Usageβ
How to Use the CLIβ
- Navigate to your project directory.
- Run the following command:
Replace
php fire <command><command>with one of the commands listed above.
π Advanced Topicsβ
Important
These features are under development.
Extending the CLIβ
- Add custom commands to extend the CLI. Refer to the advanced documentation for detailed implementation guidelines.
Debuggingβ
- Use the
--verboseoption to enable detailed logging during command execution.php fire <command> --verbose
Managing Environmentsβ
- Configure environment variables in the
.envfile to manage development, staging, and production environments effectively.